package com.anXin.user.controller;


import com.anXin.model.common.dtos.ResponseResult;
import com.anXin.model.user.pojos.Addr;
import com.anXin.model.user.pojos.Report;
import com.anXin.user.service.AddrService;
import com.anXin.user.service.ReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "健康报告接口" )
@RestController
@RequestMapping("/report")
public class ReportController {

    @Resource
    private ReportService reportService;
    @ApiOperation("生成健康报告")
    @GetMapping("/add/{id}")
    private ResponseResult add(@PathVariable("id") Long id) throws Exception {
        return reportService.add(id);
    }
    @ApiOperation("获取健康报告列表")
    @GetMapping("/list/{id}")
    private ResponseResult getOldList(@PathVariable("id") Long id){
        return reportService.getList(id);
    }

    @ApiOperation("获取该健康报告的详细信息")
    @GetMapping("/Info/{id}")
    public ResponseResult Info(@PathVariable("id")  Long id) {
        return reportService.Info(id);
    }

}